<template>
	 <!-- 搜索框 -->
	<view class="search-box">
	    <view class="search-input">
	        <text class="iconfont"  @click="goToSearchPage"></text>
	        <input type="text" v-model="searchKeyword" placeholder="请输入场馆名称" />
	        <button class="search-btn" @click="goToSearchPage">搜索</button>
	    </view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				searchKeyword:''
			}
		},
		created(){
			
		},
		methods:{
			goToSearchPage(){
				uni.navigateTo({
					url:`/pages/search/search?keyword=${encodeURIComponent(this.searchKeyword)}`,
				});
			},
		}
		
	}
</script>

<style lang="scss">
	.search-box {
		padding: 10px 16px;
		background-color: #f7f7f9;
		border-top-right-radius:20px ;
		border-top-left-radius: 20px ;
		.search-input {
			background-color: white;
			margin-top: 5px;
			border-radius: 30px;
			border: 2px solid #4A90E2;
			display: flex;
			align-items: center;
			padding: 5px 7px 5px 12px;
			input {
				flex: 1;
				margin: 0 10px;
			}
	
			.search-btn {
				background-color: #87CEEB;
				color: white;
				border-radius: 32px;
				border: 0;
				padding: 0 13px;
				font-size: 14px;
				height: 30px;
				line-height: 30px;
			}
		}
	}
</style>